package com.ruoyi.biz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizFeeMapper;
import com.ruoyi.biz.domain.BizFee;
import com.ruoyi.biz.service.IBizFeeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 费用Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-15
 */
@Service
public class BizFeeServiceImpl implements IBizFeeService 
{
    @Autowired
    private BizFeeMapper bizFeeMapper;

    /**
     * 查询费用
     * 
     * @param feeId 费用主键
     * @return 费用
     */
    @Override
    public BizFee selectBizFeeByFeeId(Long feeId)
    {
        return bizFeeMapper.selectBizFeeByFeeId(feeId);
    }

    /**
     * 查询费用列表
     * 
     * @param bizFee 费用
     * @return 费用
     */
    @Override
    public List<BizFee> selectBizFeeList(BizFee bizFee)
    {
        return bizFeeMapper.selectBizFeeList(bizFee);
    }

    /**
     * 新增费用
     * 
     * @param bizFee 费用
     * @return 结果
     */
    @Override
    public int insertBizFee(BizFee bizFee)
    {
        bizFee.setCreateTime(DateUtils.getNowDate());
        return bizFeeMapper.insertBizFee(bizFee);
    }

    /**
     * 修改费用
     * 
     * @param bizFee 费用
     * @return 结果
     */
    @Override
    public int updateBizFee(BizFee bizFee)
    {
        return bizFeeMapper.updateBizFee(bizFee);
    }

    /**
     * 批量删除费用
     * 
     * @param feeIds 需要删除的费用主键
     * @return 结果
     */
    @Override
    public int deleteBizFeeByFeeIds(String feeIds)
    {
        return bizFeeMapper.deleteBizFeeByFeeIds(Convert.toStrArray(feeIds));
    }

    /**
     * 删除费用信息
     * 
     * @param feeId 费用主键
     * @return 结果
     */
    @Override
    public int deleteBizFeeByFeeId(Long feeId)
    {
        return bizFeeMapper.deleteBizFeeByFeeId(feeId);
    }
}
